//
// Created by user on 2022/3/9.
//
#include <vector>
using namespace std;
vector<int> twoSum(vector<int>& numbers, int target) {
    int left = 0;
    int right = numbers.size()-1;


    while (left<right){
        int sum = numbers[left] +numbers[right];
        if(sum==target){
            return vector<int>{left+1, right+1};
        }
        else if(sum<target){
            left++;
        } else{
            right--;
        }

    }
    return vector<int>{};
}